\(\int (c e+d e x) (a+b \arctan (c+d x)) \, dx\) [3]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 48 \[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=-\frac {1}{2} b e x+\frac {b e \arctan (c+d x)}{2 d}+\frac {e (c+d x)^2 (a+b \arctan (c+d x))}{2 d} \]

[Out]

-1/2*b*e*x+1/2*b*e*arctan(d*x+c)/d+1/2*e*(d*x+c)^2*(a+b*arctan(d*x+c))/d

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {5151, 12, 4946, 327, 209} \[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=\frac {e (c+d x)^2 (a+b \arctan (c+d x))}{2 d}+\frac {b e \arctan (c+d x)}{2 d}-\frac {b e x}{2} \]

[In]

Int[(c*e + d*e*x)*(a + b*ArcTan[c + d*x]),x]

[Out]

-1/2*(b*e*x) + (b*e*ArcTan[c + d*x])/(2*d) + (e*(c + d*x)^2*(a + b*ArcTan[c + d*x]))/(2*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 5151

Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Dist[1/d, Subst[I
nt[(f*(x/d))^m*(a + b*ArcTan[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f, 0
] && IGtQ[p, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}(\int e x (a+b \arctan (x)) \, dx,x,c+d x)}{d} \\ & = \frac {e \text {Subst}(\int x (a+b \arctan (x)) \, dx,x,c+d x)}{d} \\ & = \frac {e (c+d x)^2 (a+b \arctan (c+d x))}{2 d}-\frac {(b e) \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,c+d x\right )}{2 d} \\ & = -\frac {1}{2} b e x+\frac {e (c+d x)^2 (a+b \arctan (c+d x))}{2 d}+\frac {(b e) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,c+d x\right )}{2 d} \\ & = -\frac {1}{2} b e x+\frac {b e \arctan (c+d x)}{2 d}+\frac {e (c+d x)^2 (a+b \arctan (c+d x))}{2 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.83 \[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=\frac {e \left (b (-d x+\arctan (c+d x))+(c+d x)^2 (a+b \arctan (c+d x))\right )}{2 d} \]

[In]

Integrate[(c*e + d*e*x)*(a + b*ArcTan[c + d*x]),x]

[Out]

(e*(b*(-(d*x) + ArcTan[c + d*x]) + (c + d*x)^2*(a + b*ArcTan[c + d*x])))/(2*d)

Maple [A] (verified)

Time = 0.11 (sec) , antiderivative size = 51, normalized size of antiderivative = 1.06

method result size
derivativedivides \(\frac {\frac {e a \left (d x +c \right )^{2}}{2}+b e \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}+\frac {\arctan \left (d x +c \right )}{2}\right )}{d}\) \(51\)
default \(\frac {\frac {e a \left (d x +c \right )^{2}}{2}+b e \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}+\frac {\arctan \left (d x +c \right )}{2}\right )}{d}\) \(51\)
parts \(e a \left (\frac {1}{2} d \,x^{2}+c x \right )+\frac {b e \left (\frac {\left (d x +c \right )^{2} \arctan \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}+\frac {\arctan \left (d x +c \right )}{2}\right )}{d}\) \(52\)
parallelrisch \(\frac {d^{3} e b \arctan \left (d x +c \right ) x^{2}+x^{2} a \,d^{3} e +2 c b e \arctan \left (d x +c \right ) x \,d^{2}+2 x a c \,d^{2} e +\arctan \left (d x +c \right ) b \,c^{2} d e -x b \,d^{2} e -5 a \,c^{2} d e +e b \arctan \left (d x +c \right ) d +2 b c d e -d e a}{2 d^{2}}\) \(105\)
risch \(-\frac {i e b \left (d \,x^{2}+2 c x \right ) \ln \left (1+i \left (d x +c \right )\right )}{4}+\frac {i e d b \,x^{2} \ln \left (1-i \left (d x +c \right )\right )}{4}+\frac {i e b c x \ln \left (1-i \left (d x +c \right )\right )}{2}+\frac {a d e \,x^{2}}{2}+\frac {e \arctan \left (d x +c \right ) b \,c^{2}}{2 d}+a c e x -\frac {b e x}{2}+\frac {b e \arctan \left (d x +c \right )}{2 d}\) \(113\)

[In]

int((d*e*x+c*e)*(a+b*arctan(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/2*e*a*(d*x+c)^2+b*e*(1/2*(d*x+c)^2*arctan(d*x+c)-1/2*d*x-1/2*c+1/2*arctan(d*x+c)))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.25 \[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=\frac {a d^{2} e x^{2} + {\left (2 \, a c - b\right )} d e x + {\left (b d^{2} e x^{2} + 2 \, b c d e x + {\left (b c^{2} + b\right )} e\right )} \arctan \left (d x + c\right )}{2 \, d} \]

[In]

integrate((d*e*x+c*e)*(a+b*arctan(d*x+c)),x, algorithm="fricas")

[Out]

1/2*(a*d^2*e*x^2 + (2*a*c - b)*d*e*x + (b*d^2*e*x^2 + 2*b*c*d*e*x + (b*c^2 + b)*e)*arctan(d*x + c))/d

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (41) = 82\).

Time = 6.12 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.98 \[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=\begin {cases} a c e x + \frac {a d e x^{2}}{2} + \frac {b c^{2} e \operatorname {atan}{\left (c + d x \right )}}{2 d} + b c e x \operatorname {atan}{\left (c + d x \right )} + \frac {b d e x^{2} \operatorname {atan}{\left (c + d x \right )}}{2} - \frac {b e x}{2} + \frac {b e \operatorname {atan}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\c e x \left (a + b \operatorname {atan}{\left (c \right )}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((d*e*x+c*e)*(a+b*atan(d*x+c)),x)

[Out]

Piecewise((a*c*e*x + a*d*e*x**2/2 + b*c**2*e*atan(c + d*x)/(2*d) + b*c*e*x*atan(c + d*x) + b*d*e*x**2*atan(c +
 d*x)/2 - b*e*x/2 + b*e*atan(c + d*x)/(2*d), Ne(d, 0)), (c*e*x*(a + b*atan(c)), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (42) = 84\).

Time = 0.31 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.50 \[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=\frac {1}{2} \, a d e x^{2} + \frac {1}{2} \, {\left (x^{2} \arctan \left (d x + c\right ) - d {\left (\frac {x}{d^{2}} + \frac {{\left (c^{2} - 1\right )} \arctan \left (\frac {d^{2} x + c d}{d}\right )}{d^{3}} - \frac {c \log \left (d^{2} x^{2} + 2 \, c d x + c^{2} + 1\right )}{d^{3}}\right )}\right )} b d e + a c e x + \frac {{\left (2 \, {\left (d x + c\right )} \arctan \left (d x + c\right ) - \log \left ({\left (d x + c\right )}^{2} + 1\right )\right )} b c e}{2 \, d} \]

[In]

integrate((d*e*x+c*e)*(a+b*arctan(d*x+c)),x, algorithm="maxima")

[Out]

1/2*a*d*e*x^2 + 1/2*(x^2*arctan(d*x + c) - d*(x/d^2 + (c^2 - 1)*arctan((d^2*x + c*d)/d)/d^3 - c*log(d^2*x^2 +
2*c*d*x + c^2 + 1)/d^3))*b*d*e + a*c*e*x + 1/2*(2*(d*x + c)*arctan(d*x + c) - log((d*x + c)^2 + 1))*b*c*e/d

Giac [F]

\[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=\int { {\left (d e x + c e\right )} {\left (b \arctan \left (d x + c\right ) + a\right )} \,d x } \]

[In]

integrate((d*e*x+c*e)*(a+b*arctan(d*x+c)),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 1.60 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.52 \[ \int (c e+d e x) (a+b \arctan (c+d x)) \, dx=a\,c\,e\,x-\frac {b\,e\,x}{2}+\frac {b\,e\,\mathrm {atan}\left (c+d\,x\right )}{2\,d}+\frac {a\,d\,e\,x^2}{2}+\frac {b\,c^2\,e\,\mathrm {atan}\left (c+d\,x\right )}{2\,d}+b\,c\,e\,x\,\mathrm {atan}\left (c+d\,x\right )+\frac {b\,d\,e\,x^2\,\mathrm {atan}\left (c+d\,x\right )}{2} \]

[In]

int((c*e + d*e*x)*(a + b*atan(c + d*x)),x)

[Out]

a*c*e*x - (b*e*x)/2 + (b*e*atan(c + d*x))/(2*d) + (a*d*e*x^2)/2 + (b*c^2*e*atan(c + d*x))/(2*d) + b*c*e*x*atan
(c + d*x) + (b*d*e*x^2*atan(c + d*x))/2